<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
    </head>
    <body>
        <script type="text/javascript">
 	   /**
	    * 监听图标按钮
	    */

	   function performCommand(event) {
	       switch (event.command) {
	       case "renren":
		   {
		       var newTab = safari.application.activeBrowserWindow.openTab();
		       newTab.url = 'http://www.renren.com/?origin=92009';
		       break;
		   }
	       }
	   }

	   //添加监听
	   safari.application.addEventListener("command", performCommand, false);</script>
    </body>
</html>
